package engine.newUi
{
	import engine.control.loading.MultLoader;
	import engine.control.loading.NxLoading;
	import engine.flag.GameDefine;
	import engine.tip.tipItem.BookKungfuItem;
	import engine.ui.MainUIManager;
	import engine.ui.lite.BaseUI;
	
	import flash.display.DisplayObjectContainer;
	import flash.display.MovieClip;
	
	import newx.NxApi;
	import newx.StageInfo;
	import newx.com.control.NxClip;
	import newx.com.control.button.NxButton;
	import newx.com.control.group.NxViewGroup;
	import newx.com.control.text.NxLabel;
	import newx.com.control.text.NxText;
	import newx.com.control.window.NxWindowDragType;

	public class TourUI extends BaseUI
	{
		public static var _self:TourUI ; 
		public static function getInstance():TourUI
		{
			if(_self==null)
			{
				_self = new TourUI(); 
			}
			return _self
		}

		
		public var tour_1:MovieClip ; 
		public var tour_2:MovieClip ; 
		public var tour_3:MovieClip ; 
		public var tour_4:MovieClip ; 
		public var tour_5:MovieClip ; 
		public var tour_6:MovieClip ; 
		
		public var label_1:NxLabel ; 
		public var label_2:NxLabel ; 
		
		public var closeBtn:NxButton ; 
		public var clearcd:NxButton;  
		public var mc_tx:MovieClip; 
		public var goods:MovieClip;
		public var goods_tx:MovieClip; 
		
		public var giveup_btn:NxButton;
		public var finish_btn:NxButton;
		public var finishrw_btn:NxButton; 
		public function TourUI(popupUI:Boolean=true)
		{
			super(popupUI) ; 
			
		}
		override public function Init():void
		{
			
			TourLogic.getInstance().Init(); 
			
		}
		override protected function BeforeShow():void
		{
			
		}
		override protected function AfterHide():void
		{
			TourLogic.getInstance().AfterHide();
			
			MainUIManager.getInstance().intoScene();
		}
		override public function show(space:DisplayObjectContainer=null, onshow:Function=null, ...argc):void
		{
			if(!MultLoader.getInstance().getSourceByUrl(StageInfo.swfResPath + "tour.swf"))
			{
				MultLoader.getInstance().load([StageInfo.swfResPath + "tour.swf"],true,createScene);
			}else
			{
				createScene();
			}
			
			
		}
		private function createScene():void
		{
			TourLogic.getInstance().BeforeShow();
			
			MainUIManager.getInstance().intoScene(GameDefine.SceneType_Tour);
		}
		/**
		 * 调整 界面位置 
		 * 
		 */		
		override public function modifyPostion():void
		{
			
		}
	}
}